using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace Dan{

	public class Uber2DGUI : CustomShaderGUI {
		protected override void ShowGUI(){
            ShowMain();
            ShowPixelStyle();
            ShowBlur();
            ShowDesaturate();
            ShowShadow();
            ShowChromaticAberration();
            ShowOutline();
            ShowInnerOutline();
            ShowOldPhoto();
            ShowDissolve();
            ShowDistort();
        }	
    

		
      	void ShowMain(){
            var prop = ShaderGUI.FindProperty("_MainTex", properties);
            var prop2 = ShaderGUI.FindProperty("_Color", properties);
            this.editor.TexturePropertySingleLine(MakeLabel(prop), prop, prop2);
            GUILayout.Space(15);
        }      

        void ShowPixelStyle(){
            ShowToggleBlock("_UsePixelate", "USE_PIXELATE", () => { ShowPropertys("_PixelResolution"); });
        }

        void ShowBlur(){
            ShowToggleBlock("_UseBlur", "USE_BLUR", () => { ShowPropertys("_BlurIntensity"); });
        }

        void ShowDesaturate(){
            ShowToggleBlock("_UseDesaturate", "USE_DESATURATE", () => { ShowPropertys("_DesaturateFactor"); });
        }

        void ShowShadow(){
            ShowToggleBlock("_UseShadow", "USE_SHADOW", () => {
                ShowPropertys("_ShadowColor");
                ShowPropertys("_ShadowOffset");
            });
        }

        void ShowChromaticAberration(){
            ShowToggleBlock("_UseChromaticAberr", "USE_CHROMATIC_ABERRATION", () => {
                ShowPropertys("_ChromaticAberrFactor");
                ShowPropertys("_ChromaticAberrAlpha");
            });
        }

        void ShowOutline(){
            ShowToggleBlock("_UseOutline", "USE_OUTLINE", () => {
                ShowPropertys("_OutlineColor");
                ShowPropertys("_OutlineWidth_Alpha_Glow");
            });
        }

        void ShowInnerOutline(){
            ShowToggleBlock("_UseInnerOutline", "USE_INNER_OUTLINE", () => {
                ShowPropertys("_InnerOutlineColor");
                ShowPropertys("_InnerOutlineWidth_Alpha_Glow");
            });

        }    



        void ShowOldPhoto(){
            ShowToggleBlock("_UseOldPhoto", "USE_OLDPHOTO", () => {
                ShowPropertys("_OldPhotoProgress");
                
            });

        }    



        void ShowDissolve(){
            ShowToggleBlock("_UseDissolve", "USE_DISSOLVE", () => {
                ShowPropertys("_DissolveTex");
                ShowPropertys("_DissolveProgress");
                ShowPropertys("_Dir");
                ShowPropertys("_DissolveColor");
                ShowPropertys("_DissolveRage");        
            });

        }    


		void ShowDistort(){
            ShowToggleBlock("_UseDistort", "USE_DISTORT", () => {
                ShowPropertys("_DistortTex");
                ShowPropertys("_DistortStrength");
                ShowPropertys("_WaveX");
                ShowPropertys("_WaveY");
                ShowPropertys("_DistanceX"); 
                ShowPropertys("_DistanceY");
                ShowPropertys("_Speed");       
            });

        }    
 















	}//uber2DGUI







}//namespace